import os
def File_check(file):
    if os.path.exists(file):
        file1=open(file,"a+",encoding = "utf-8")
    else:
        file1=open(file,"x",encoding = "utf-8")
    return file1

file=File_check('./test.txt')
print(file.name)
print(file.isatty())
# for i in range(50,100):
#     file.write('a')
# file.write('\n')
print(file.tell())
file.seek(0)
print(file.tell())
x=file.read()
print('"'+x+'"')
file.close()